<?php
class Thongke_model extends CI_Model {
    //var $solansua;
    var $nguoidung_last;
    var $nguoidung_first;
    var $datetime_last;
    var $datetime_fisrt;
    //$loai = tin bai, 
    function __construct($id,$loai)
    {
        parent::__construct();
        $this->db->where('id_'.$loai,$id);
        $this->db->select('nguoidung_first,nguoidung_last,datetime_first,datetime_last');
        $query=$this->db->get($loai);
        $result=$query->result();
        foreach($result as $row);
        $this->nguoidung_last=$row->nguoidung_last;
        $this->nguoidung_first=$row->nguoidung_first;
        $this->datetime_fisrt=$row->datetime_fisrt;
        $this->datetime_last=$row->datetime_last;
    }
    function nguoidung_last()
    {
        return $this->nguoidung_last;
    }
    function nguoidung_first()
    {
        return $this->nguoidung_first;
    }
    function datetime_last()
    {
        return $this->datetime_last;
    }
    function datetime_first()
    {
        return $this->datetime_fisrt;
    }
}
?>